<template>
  <div v-if="$route.meta.useFrame != undefined && $route.meta.useFrame == true">
    <RouterView></RouterView>
  </div>
    <div v-if="$route.meta.useFrame == undefined || $route.meta.useFrame == false">
      <el-container>
        <el-header class="header">
          <el-row class="row-bg" justify="space-between">
            <el-col :span="6">
              <img src='./assets/logo.jpg' alt='' width="200px" height="45px">
            </el-col>
            <el-col :span="6">
              <span style="line-height: 45px; padding-left: 20px;">智能多端服务管理系统</span>
            </el-col>
            <el-col :span="6">
              <el-dropdown>
                <span class="el-dropdown-link">
                  管理员
                  <el-icon color="white" size="20" style="padding-top:10px;">
                    <UserFilled />
                  </el-icon>
                </span>
                <template #dropdown>
                  <el-dropdown-menu>
                    <el-dropdown-item>个人中心</el-dropdown-item>
                    <el-dropdown-item>账号与安全</el-dropdown-item>
                    <el-dropdown-item>关于我们</el-dropdown-item>

                    <el-dropdown-item divided>退出</el-dropdown-item>
                  </el-dropdown-menu>
                </template>
              </el-dropdown>

            </el-col>
          </el-row>
        </el-header>
        <el-container>
          <el-aside width="200px" class="aside">
            <Menu></Menu>
          </el-aside>
          <el-main>
            <!--路由的出口-->
            <RouterView></RouterView>
          </el-main>
        </el-container>
      </el-container>
    </div>
</template>

<script setup lang="ts">
import Menu from './components/menu/Menu.vue'

</script>

<style scoped>
.header {
  background-color: #c6e2ff;
  padding-left: 0px;
  height: 45px;
}

.aside {
  background-color: #d9ecff;
}

.example-showcase .el-dropdown-link {
  cursor: pointer;
  color: #c6e2ff;
  display: flex;
  align-items: center;
}

.el-dropdown {
  margin-left: 115px;
  line-height: 45px;
  --el-dropdown-menuItem-hover-color: #c6e2ff;
  color: white;
  font-size: 16px;
  font-weight: 700;
}
</style>
